
package urnoted;
import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JFrame;

import urnoted.Controller;

public class GUI extends JFrame {
    private static final int X0 = 960;  // location coordinates on screen
    private static final int Y0 = 0;
    private ControlPanel controlPanel;
    private StaffPanel staffPanel;
    private KeyboardPanel keyboardPanel;
    private ResultsPanel resultsPanel;

    public GUI(Controller controller) {
        this.controlPanel = new ControlPanel(controller);
        this.staffPanel = new StaffPanel(controller, Note.C4);
        this.keyboardPanel = new KeyboardPanel(controller, true);
        this.resultsPanel = new ResultsPanel(controller);
        
        setTitle("Control Panel Demo");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLayout(new BorderLayout());

        
        add(keyboardPanel,BorderLayout.NORTH);
        add(controlPanel,BorderLayout.WEST);
        add(staffPanel,BorderLayout.CENTER);
        add(resultsPanel,BorderLayout.SOUTH);
        
        setLocation(X0, Y0);
        pack();
        setVisible(true);
    }

    public ControlPanel getControlPanel() {
        return controlPanel;
    }

    public KeyboardPanel getKeyboardPanel() {
        return keyboardPanel;
    }

    public StaffPanel getStaffPanel() {
        return staffPanel;
    }
    
    public ResultsPanel getResultsPanel() {
        return resultsPanel;
    }
}
